The intra prediction modes used in High Efficiency Video Coding (HEVC) are illustrated in FIG. 5. In HEVC, there are total 35 intra prediction modes, among which mode 10 is horizontal mode (501), mode 26 is vertical mode (502), and mode 2, mode 18, and mode 34 are diagonal modes (503). The intra prediction modes are signalled by three most probable modes (MPMs) and 32 remaining modes.
To code an intra mode, a most probable mode (MPM) list of size 3 is built based on the intra modes of the neighboring blocks. This MPM list will be referred to as the MPM list or primary MPM list. If the intra mode is not from the MPM list, a flag is signalled to indicate whether the intra mode belongs to the selected modes.
A process of generating the MPM list is shown as follows. Here, leftIntraDir indicates a mode in a left block and aboveIntraDir indicates a mode in an above block. If the left or above block is currently not available, leftIntraDir or aboveIntraDir is set to an index DC_IDX. In addition, variables “offset” and “mod” are constant values, which are set to 29 and 32, respectively.                If (leftIntraDir==aboveIntraDir && leftIntraDir>DC_IDX)                    MPM [0]=leftIntraDir;            MPM [1]=((leftIntraDir+offset) % mod)+2;            MPM [2]=((leftIntraDir−1) % mod)+2;                        Else if (leftIntraDir==aboveIntraDir)                    MPM [0]=PLANAR_IDX;            MPM [1]=DC_IDX;            MPM [2]=VER_IDX;                        Else if (leftIntraDir !=aboveIntraDir)                    MPM [0]=leftIntraDir;            MPM [1]=aboveIntraDir;            If (leftIntraDir>0 && aboveIntraDir>0)                            MPM [2]=PLANAR_IDX;                                    Else                            MPM [2]=(leftIntraDir+aboveIntraDir)<2 ? VER_IDX: DC_IDX;                                                